package lgs.hm.util;

import java.util.Map;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;

@Configuration
@ImportResource("classpath:util/app.cfg.xml")
//@PropertySources(@PropertySource(""))
@PropertySource("classpath:util/db.properties")
public class CollectionDemo {
	
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(CollectionDemo.class);
		
		Man man = context.getBean(Man.class);
		System.out.println(man);
		
		Map map = (Map) context.getBean("dsz");
		System.out.println(map);
		
		Object bean = context.getBean("dataBase");
		System.out.println(bean);
	}

}
